var http=require("http");

var server=http.createServer(function (req,res) {
  /*  console.log("客户端接入")
       res.statusCode=200;
       res.setHeader("Content-Type","text/html");
       res.end("hello world");*/
}).listen(2000);

server.on("error",function (err) {
    console.log(err)
});
server.on("listening",function () {
    console.log("服务器已启动");
});
server.on("request",function (req,res) {
    console.log("客户端接入");
    res.writeHead(200,"OK",{
       "content-type":"text/html"
    });
    res.write("hello");
    res.write("world");

    res.end();
});

server.setTimeout


